﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if sid="Null" then
Response.Redirect "/login.asp?sid=" & sidd & "&url=/diy/Transfmp3.asp"
Response.end
end if
bitttt=qingtian.confff("bit")
bittt=conn.execute("select money from [qingtian_user] where sid='"&qingtian.Formatsid(sid)&"'")("money")
select case v
case "0"
we0="<br/>"
hr="-----------<br/>"
%>
<card title="魔幻爆闪字制作"><p align="<%=qingtian.px%>">
<%
case "1"
zi="<span style=""color:#FF5500"">"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
%>
<title>魔幻爆闪字制作</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select
%>
<%=qingtian.qingsav("10086")%>
<%
on error resume next
Dim fs, f, f1, fc,cs,i,fsod,Filedel
i=0 
Filepath=Server.MapPath("/diy/Images/")
Set fs = CreateObject("Scripting.FileSystemObject") 
Set f = fs.GetFolder(Filepath)
Set fc = f.Files
For Each f1 in fc
i=i+1
Next
If i>30 Then
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Filepath)
Set fc = f.Files
For Each f1 in fc
Filedel=Filepath&"/"&f1.name
set fsod = createobject("scripting.filesystemobject")
If (fsod.fileexists(Filedel)) Then
fsod.deletefile(Filedel)
End If
set fsod = Nothing
i=i+1
Next
End If
Response.Write(""&dao&"=魔幻爆闪字制作="&we0&""&we&"")
if Request.QueryString("act")=1 then
if session("uurl")<>"" then
Response.Write qingtian.touxian(session("uurl"))
else
Response.Write "设为头像失败!"
end if
session("uurl")=""
Response.Write "<br/>"
end if
Dim backurl,mo2,mob,ii,filename1,cc
filename1="Dodging.asp"	'本文件名
cc=clng(request("cc"))
backurl=request("backurl")
cc=clng(request("cc"))
backurl=Replace(backurl,"@@","&")
If left(backurl,1)<>"/" Then backurl="/"&backurl
mo2=split(backurl,".")
mob=lcase(mo2(ubound(mo2)))	'字符变小写参数前加
ii="jpg|gif|bmp|jpeg|peg|png|jpge|mid|midi|mmf|amr|img|adp|m4a|mp3|aac|wav|wma|ogg|avi|mp4|3gp|wmv|rm|rmvb|dat|mpg|asf|umd|txt|chm|brm|prc|pdb|mdx|trc|sis|sisx|jar|jad|cab|mpkg|hme|ski|thm|uiq|nth|utz|mtf|sdt|tsk|nec|nes|gba|gb|gbc|gba|fba|md|sfc|smc|lrc|nol|rar|zip|7z|emz|pdf|pdg"
If instr(ii,mob)>0 Then
Response.redirect "http://www.czxiu.com"&backurl
Response.End
End If
%>
<%
text1=TRim(Request("text1"))
type1=TRim(Request("type1"))
If text1<>"" and type1<>"" Then
If bittt<bitttt and qingtian.vip(qingtian.nid)<>"VIP会员" Then 
Response.Write "出错了！你的"&qingtian.bi&"不够哦！"
else
if len(text1)>150 then
Response.Write "错误，最大支持文字150个字符！<br/>"
Else
id1=request("id1")
id2=request("id2")
id3=request("id3")
id4=request("id4")
id5=request("id5")
id6=request("id6")
t_sks=1200
t_text=Application(filename1 & sid & curl & text1 & id1)
If t_text="" or DateDiff("s",t_text,now())>t_sks Then		'缓存为空时，读取远程数据
Url="http://3.jiqie.com/b/" & type1 & ".php"	'传送过去的内容
Data="id=" & server.urlencode(text1) & "&id1=" & id1 & "&id2=" & id2 & "&id3=#" & id3 & "&id4=#" & id4 & "&id5=#" & id5 & "&id6=#" & id6 & ""
wstr=qingtian.getHTTPPage2(url,Data)
start=Instr(wstr,"<img")+11
over=Instr(wstr,"gif>")+3
body=mid(wstr,start,over-start)
'以下替换内容
body = replace(body,Chr(10),"")
body = replace(body,Chr(13),"")
body = replace(body,"""","'")
body = replace(body,vbndwline,"")
body = replace(body,vbLf,"")
body = replace(body,vbCr,"")
'-------------------------------------
	Set re=new RegExp
	re.IgnoreCase =true
	re.Global=True
	re.pattern=""
	body= re.Replace(body,"")
'	re.pattern="<a href='([^h])"
'	body= re.Replace(body,"<a href='"&filename1&"?backurl=$1")
	set re=Nothing

'-------------------------------------
If len(body)<1 Then
Response.Write "对不起，由于网络原因数据获取失败，请稍候再试！<br/>"
Else
'Application(filename1 & sid & curl & name & id)=body
'Response.Write body
'End If
'Else '直接输出缓存
'Response.Write t_text
'End If
'Response.Write "<br/>"
'End If
'End If
%>
<%
RemoteFileUrl ="http://3.jiqie.com" & body
FileExt = right(RemoteFileUrl,4) 
randomize
ranNum = int(9*10^3*rnd)+10^3
dtNow = Now()
FileName = year(date) & month(date) & day(date) & "0" & minute(now()) & second(now()) & "_" & Replace(Request.ServerVariables("Server_NAME"),".",".") & FileExt
LocalFileName = "/diy/images/" 
If right(LocalFileName,1) <> "/" Then LocalFileName = LocalFileName & "/"
SaveFile = server.mappath(LocalFileName & FileName)
SaveRemoteFile SaveFile,RemoteFileUrl 
saveimg=LocalFileName & FileName 
uurl=saveimg
session("uurl")=uurl
Dim filetest,filesize
set filetest=server.CreateObject("Scripting.FileSystemObject")
filesize=filetest.GetFile(server.MapPath(uurl)).size
If filesize<>"" and filesize>0 Then
if qingtian.vip(qingtian.nid)="VIP会员" then
qingtian.addong("在[url=/diy/Dodging.asp?sid=[sid]]魔幻爆闪字制作[/url]制作了彩字")
Response.Write Right(body,3) & "制作成功，文件大小为" & FormatNumber(filesize/1024,1) & "KB<br/>"
Response.Write "<img src='" & uurl & "' alt='Load...'/><br/>"
Response.Write "<a href='" & uurl & "'>免费下载</a>.<a href='" & filename1 & "?act=1&amp;sid=" & sidd & "'>设为头像</a><br/>"
else
qingtian.payy("-"&bitttt)
qingtian.addong("在[url=/diy/Dodging.asp?sid=[sid]]魔幻爆闪字制作[/url]制作了彩字")
Response.Write Right(body,3) & "制作成功，文件大小为" & FormatNumber(filesize/1024,1) & "KB<br/>系统自动扣除你"&bitttt&""&qingtian.bi&"<br/>你现在的"&qingtian.bi&":"&bittt&"<br/>"
Response.Write "<img src='" & uurl & "' alt='Load...'/><br/>"
Response.Write "<a href='" & uurl & "'>免费下载</a>.<a href='" & filename1 & "?act=1&amp;sid=" & sidd & "'>设为头像</a><br/>"
end if
Else
Response.Write "对不起，由于网络原因图片获取失败，请稍候再试！<br/>"
End If
set filesize=nothing
set filetest=nothing
End If
End If
End If
End If
End If
%>
<%=we1%><%=hr%><%=sou%>注意:<%=zi%>普通会员每次制作系统自动扣除<%=bitttt%><%=qingtian.bi%>(VIP会员免费制作)<%=zi0%><%=we0%>
<%
        if v=1 then
	%>
        <form action="<%=filename1%>?sid=<%=sidd%>" method="post">
<%=we%>
输入文字(最多100字)<br/>
<textarea name="text1" rows="3"/></textarea><br/>
        <%
        else
	%>
输入文字(最多100字)<br/>
<input name="text1" type="text" maxlength="100" value=""/><br/>
        <%
        end if
        %>
字体：<select name="id1">
<option value="05">古典闪字</option>
<option value="00">行楷闪字</option>
<option value="04">草书闪字</option>
<option value="01">行书闪字</option>
<option value="9">连笔闪字</option>
<option value="02">隶书闪字</option>
<option value="03">公文闪字</option>
</select><br/>
闪速:
<select name="id2">
<option value="30">0.3 秒/帧</option>
<option value="1">0.01 秒/帧</option>
<option value="10">0.1 秒/帧</option>
<option value="20">0.2 秒/帧</option>
<option value="40">0.4 秒/帧</option>
<option value="80">0.8 秒/帧</option>
<option value="100">1.0 秒/帧</option>
<option value="200">2.0 秒/帧</option>
<option value="400">4.0 秒/帧</option>
<option value="800">8.0 秒/帧</option>
</select><br/>
字体颜色1：<select name="id3" value="FF0000">
<option value="FF0000">红色</option>
<option value="00FF00">绿色</option>
<option value="0000FF">蓝色</option>
<option value="FF00FF">紫色</option>
<option value="FFFFFF">白色</option>
<option value="000000">黑色</option>
<option value="FFFF00">黄色</option>
</select>
<br/>
字体颜色2：<select name="id4" value="00FF00">
<option value="FF0000">红色</option>
<option value="00FF00">绿色</option>
<option value="0000FF">蓝色</option>
<option value="FF00FF">紫色</option>
<option value="FFFFFF">白色</option>
<option value="000000">黑色</option>
<option value="FFFF00">黄色</option>
</select>
<br/>
字体颜色3：<select name="id5" value="0000FF">
<option value="FF0000">红色</option>
<option value="00FF00">绿色</option>
<option value="0000FF">蓝色</option>
<option value="FF00FF">紫色</option>
<option value="FFFFFF">白色</option>
<option value="000000">黑色</option>
<option value="FFFF00">黄色</option>
</select>
<br/>
字体颜色4：<select name="id6" value="FF00FF">
<option value="FF0000">红色</option>
<option value="00FF00">绿色</option>
<option value="0000FF">蓝色</option>
<option value="FF00FF">紫色</option>
<option value="FFFFFF">白色</option>
<option value="000000">黑色</option>
<option value="FFFF00">黄色</option>
</select><br/>
闪动类别：<select name="type1" value="10">
<option value="10">魔幻闪字</option>
<option value="11">爆闪头像</option>
</select><br/>
        <%
        if v=0 then
Response.Write "<anchor title=""submit"">提交制作<go href=""" & filename1 & "?sid=" & sidd & """ method=""post"">"
%>
<postfield name="text1" value="$(text1)"/>
<postfield name="id1" value="$(id1)"/>
<postfield name="id2" value="$(id2)"/>
<postfield name="id3" value="$(id3)"/>
<postfield name="id4" value="$(id4)"/>
<postfield name="id5" value="$(id5)"/>
<postfield name="id6" value="$(id6)"/>
<postfield name="type1" value="$(type1)"/>
</go>
</anchor><br/>
        <%
        else
	%><%=we1%>
        <input type="submit" value="提交制作"/>
        </form><br/>
	<%
	end if
	%>
<%=we%><%=hr%>
快告诉你的朋友来这里玩玩吧,古话说的好,独乐乐不如众乐乐.<%=we0%>
<%=sou%><a href='index.asp?sid=<%=sidd%>'>返回制作首页</a><%=we0%>
<%
End function
Sub SaveRemoteFile(LocalFileName,RemoteFileUrl)
Dim Ads,Retrieval,GetRemoteData
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile LocalFileName,2
.Cancel()
.Close()
End With
Set Ads=nothing
End sub
%>
